import Vue from 'vue'
import App from './App'





Vue.config.productionTip = false
// my-class
import pageLoading from 'components/other/pageLoading.vue'
import errorPage from 'components/other/error-page.vue'
Vue.component('pageLoading',pageLoading)
Vue.component('errorPage',errorPage)
//  封装全局js
import xin from './utlis/xin'
Vue.prototype.xin = xin
App.mpType = 'app'
// request ------
import http from './utlis/api/http.js'
Vue.prototype.$http = http
import './utlis/api/model/apiModel'
// request end ----
// 引入UI框架
import uView from "components/uview-ui";
Vue.use(uView);
// 时间插件
import moment from '@/utlis/moment.js'
moment.locale('zh-cn');
Vue.prototype.$moment = moment; //赋值使用
Vue.filter('dateFormat', function(dataStr, pattern = 'YYYY-MM-DD HH:mm:ss') {
	if(dataStr && dataStr.toString().length){
		dataStr = dataStr*1000
	}
	return moment(dataStr).format(pattern)
})

// vuex
import store from '@/store/store.js'
const app = new Vue({
  ...App,
	store
})
app.$mount()
